﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>AOJ 论坛登陆</title>
    <link rel="stylesheet" type="text/css" href="styles/css.css" />

    <script type="text/javascript" language="javascript">
        function submitRegister(evt) {
            var evt=evt?evt:(window.event?window.event:null);//兼容IE和FF
            if (evt.keyCode == 13) {
                __doPostBack('reg_submit', '');
            }
        }
        function submitLogin(evt) {
            var evt = evt ? evt : (window.event ? window.event : null); //兼容IE和FF
            if (evt.keyCode == 13) {
                __doPostBack('btn_login', '');
            }
        }
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <%@ register tagname="header" tagprefix="ucl" src="header.ascx" %>
        <ucl:header ID="Header1" runat="server" />
        <div id="main-wrap">
            <div id="Login-Side">
                <p>
                    <span class="BigTitle">用户登陆</span>
                </p>
                <table border="0" cellspacing="0" cellpadding="0" width="230px">
                    <tr>
                        <td width="40px">
                            <span>账户:</span>
                        </td>
                        <td>
                            <input onkeydown="submitLogin(event);" type="text" name="username" class="input-text" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <div class="errormessage" style="display: none" id="usernameempty" runat="Server">
                                *账户不可为空
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span>密码:</span>
                        </td>
                        <td>
                            <input onkeydown="submitLogin(event);" type="password" name="password" class="input-text" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <div class="errormessage" style="display: none" id="passwordcheck" runat="Server">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <input type="checkbox" id="autoLogin" runat="Server" value="true" />
                            <span style="font-size:small;" />下次自动登陆 </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Button ID="btn_login" Width="45" Height="25" Text="登陆" runat="server" OnClick="submit"
                                class="btnStyle" UseSubmitBehavior="False" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <a class="login_link" href="http://www.baidu.com">忘记密码?</a>
                        </td>
                    </tr>
                </table>
            </div>


            <div id="RegisterPart" style="display: block" runat="Server">
                
                    <span class="BigTitle" >新用户注册</span>
                
                <table>
                    <tbody>
                        <tr>
                            <td>
                                用户名:
                            </td>
                            <td>
                                <input onkeydown="submitRegister(event);" type="text" name="reg_username" />
                            </td>
                            <td>
                                <span class="tipsmessage" runat="Server" id="usernamemsg">*您登陆论坛使用且无法修改</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                密码:
                            </td>
                            <td>
                                <input onkeydown="submitRegister(event);" type="password" name="reg_password" />
                            </td>
                            <td>
                                <span class="tipsmessage" runat="Server" id="passwordmsg">*密码为字母或数字，至少6位</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                确认密码:
                            </td>
                            <td>
                                <input onkeydown="submitRegister(event);" type="password" name="reg_password2" />
                            </td>
                            <td>
                                <span class="tipsmessage" runat="Server" id="pwdconfirmmsg">*请再输入一次密码</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                用户昵称:
                            </td>
                            <td>
                                <input onkeydown="submitRegister(event);" type="text" name="reg_nickname" />
                            </td>
                            <td>
                                <span class="tipsmessage" runat="Server" id="nicknamemsg">*昵称将显示在论坛回复中</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <div style="height: 40px">
                                    <asp:Button Text="提交" runat="server" ID="reg_submit"  OnClick="reg_Click" 
                                        class="btnStyle" UseSubmitBehavior="False" />
                                </div>
                            </td>
                            <td>
                            <span class="errormessage" runat="Server" id="regerrormsg"></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                
            </div>
            <div class="clearfloat">
            </div>
        </div>
        <%@ register tagname="footer" tagprefix="ucl" src="footer.ascx" %>
        <ucl:footer runat="server" />
    </div>
    </form>
</body>
</html>
